/**
 * Author: Dmitry Ustimov
 * Date: 5/11/13
 * Time: 9:29 PM
 */

package com.gmail.dmitryustimov.ms.java7.composite.mod.example;

import java.util.ArrayList;
import java.util.List;

public abstract class Component<T> {

    protected List<Component<T>> components = new ArrayList<>();

    public void add(Component<T> component) {
        components.add(component);
    }

    public void remove(Component<T> component) {
        components.remove(component);
    }

    public abstract void doAction();
    public abstract boolean isComposite();
}
